package cn.echo.ecc.fallback;

import cn.echo.ecc.feign.CourseMarketService;
import cn.echo.ecc.feign.CourseUserLearnService;
import cn.echo.ecc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class CourseUserLearnServiceFallbackFactory implements FallbackFactory<CourseUserLearnService> {
    @Override
    public CourseUserLearnService create(Throwable throwable) {
        return new CourseUserLearnService() {

            @Override
            public JSONResult getCourseUserLearnByCourseId(Long courseId, Long loginId) {
                return JSONResult.error();
            }
        };
    }
}
